package com.wufan.day07.java3;

/**
 * @author SongWufan
 * @date 2022/1/20 20:15
 */
public class PersonImpl extends Person {

    String major;
    /**
     * 学号
     */
    int id = 1002;

    public PersonImpl() {

    }

    public PersonImpl(String name, int age, String major) {
        super(name, age);
        this.major = major;
    }

    @Override
    public void eat() {
        System.out.println("学生：吃营养食物");
    }

    public void study() {
        System.out.println("学生：学习知识");
        this.eat();
        super.eat();
        walk();
    }

    public void show() {
        System.out.println("name："+name+",age："+age+",学号："+this.id+",身份证号："+super.id);
    }

}
